[mirrors]
http://www.yassl.com/altpkg/wolfssl-3.4.6.tar.xz

[vars]
filesize=951728
sha512=18bda7d9e2c01347076e4e718cc41b7dcfb07a22d404d221508b028f1a2afee0f986b211cd385a792a9648a7dabbdf5ecad5ca3570ca2aaa9432645aa87801c3
desc='lightweight SSL/TLS library with partial openssl compatibility layer'

[deps]

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"
debug_flags=
[ "$DEBUGBUILD" = 1 ] && debug_flags=--enable-debug

C_EXTRA_FLAGS="-D_GNU_SOURCE $optcflags" \
./configure --prefix="$butch_prefix" $xconfflags \
  --enable-dtls --enable-opensslExtra \
  --enable-static $debug_flags \
  --disable-silent-rules \
  --enable-ipv6 --enable-ripemd --enable-sha512 \
  --enable-sessioncerts --enable-certgen
# aesni is only for cpus with aes extension, amd bulldozer+ or corei7ish
# sniffer depends on pcap

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

if false ; then
	# this was an attempt to use cyassl's openssl compatibility layer
	# however it is not fit for this yet.
	ln -sf cyassl/openssl/ "$butch_install_dir/include/"

	ln -sf libcyassl.a "$butch_install_dir/lib/libssl.a"
	ln -sf libcyassl.a "$butch_install_dir/lib/libcrypto.a"

	ln -sf libcyassl.so "$butch_install_dir/lib/libssl.so"
	ln -sf libcyassl.so "$butch_install_dir/lib/libssl.so.1.0.0"

	ln -sf libcyassl.so "$butch_install_dir/lib/libcrypto.so"
	ln -sf libcyassl.so "$butch_install_dir/lib/libcrypto.so.1.0.0"
fi

